package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ciaojian.core.enums.business.ShareRecordPlatformEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 分享记录表
 * </p>
 *
 * @author Atlakyn
 * @since 2021-03-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_share_record")
public class ShareRecord extends Model<ShareRecord> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("分享人Id")
    private Integer inviteId;

    @ApiModelProperty("被分享人Id")
    private Integer shareId;

    @ApiModelProperty("分享人手机号")
    private String invitePhone;

    @ApiModelProperty("分享平台")
    private ShareRecordPlatformEnum platform;

    @ApiModelProperty("裂变活动Id")
    private Integer mId;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
